import { createApp } from 'vue'
import './style.css'
import "normalize.css"
import "@/assets/icon-font/iconfont.css"
import { router } from './router'
import { scale } from "@/directives/scale"
import App from './App.vue'
import { useFontSize } from './utils/useFontSize'

import myComponent from "@/components"


// 数据持久化
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

const app = createApp(App)

useFontSize()

// 全局指令 点击放大元素
app.directive('scale', scale)
  .use(myComponent)
  .use(pinia)
  .use(router)
  .mount('#app')
